<template>
  <div>
    <el-card class="box-card">
      <el-table :data="tableData"
                style="width: 100%">
        <el-table-column
          prop="CusId"
          label="顾客号"
          width="140">
        </el-table-column>
        <el-table-column
          prop="Recipients"
          label="顾客名"
          width="140">
        </el-table-column>
        <el-table-column
          prop="Address"
          label="收件地址"
          width="140">
        </el-table-column>
        <el-table-column
          prop="Telephone"
          label="联系电话"
          width="140">
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import { fetchDatacustomer } from '../api'
export default {
  data: function () {
    return {
      tableData: [{
        cus_id: '1',
        recipients: '张三',
        address: '北京朝阳区',
        telephone: '18987564852'
      },
      {
        cus_id: '2',
        recipients: '李四',
        address: '广州潮汕区',
        telephone: '1656187525'
      },
      {
        cus_id: '3',
        recipients: '王麻子',
        address: '遵义花岗区',
        telephone: '18845924582'
      },
      {
        cus_id: '4',
        recipients: '王三',
        address: '河南郑州',
        telephone: '18945824852'
      }
      ]
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getData () {
      fetchDatacustomer(this.query).then(res => {
        console.log(res)
        this.tableData = res.data.value
        // this.pageTotal = res.pageTotal || 50
      })
    }
  }
}
</script>

<style scoped>

</style>
